package gamebackend;

import framework.Point;

public class MoveToFlier implements OldFlier{

	private double my_target;
	private Ship my_ship;

	public MoveToFlier(double target) {
		my_target = target;
	}
	@Override
	public void getNextPosition(final Point the_point) {
		my_ship.step(1000 / 30, my_ship.getYPositionChange(1000 / 30));
		the_point.set(my_ship.getXPosition(), my_ship.getYPositionChange(1000 /30));
	}
	
	public void setTarget(double target) {
		my_target = target;
		my_ship.moveTo(my_target);
	}

	@Override
	public void setShip(Ship ship) {
		my_ship = ship;
		my_ship.moveTo(my_target);
	}

}
